﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace T.FAS.Runtime.Base.Entity
{
    /// <summary>
    /// 校验规则
    /// </summary>
    public class ValidateRule
    {
        /// <summary>
        /// ID
        /// </summary>
        public string ID { get;set;}
        /// <summary>
        /// 规则显示名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 原始正则内容
        /// </summary>
        public string OriginRegContent { get; set; }
        /// <summary>
        /// 自定义正则内容
        /// </summary>
        public string CustomRegContent { get; set; }
        /// <summary>
        /// 当校验失败是的错误信息
        /// </summary>
        public string ErrMsg { get; set; }
        /// <summary>
        /// 自定义报错信息
        /// </summary>
        public string CustomErrMsg { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public ValidateRuleType Type { get; set; }

        /// <summary>
        /// 项目id
        /// </summary>
        public string ProjectID { get; set; }

        public string Creator { get; set; }
        public DateTime CreateTime { get; set; }
        public string LastModifier { get; set; }
        public DateTime LastModifyTime { get; set; }
    }

    public enum ValidateRuleType
    {
        /// <summary>
        /// 系统规则
        /// </summary>
        System = 0,
        /// <summary>
        /// 自定义规则
        /// </summary>
        Custom = 1,
    }
}
